Variant Ownership with Existential Types
نویسندگان
چکیده
We propose an ownership types system with existential quantification of owners, similar to the existential quantification of types in models of Java wildcards. This produces a system with variant ownership types. Using explicit existential types for variance is more expressive, less ad hoc, and easier to understand and reason about than previous solutions. Furthermore, we propose using both type and ownership parameters to increase the precision with which variant types can be specified.
منابع مشابه
Existential Quantification for Variant Ownership
Ownership types characterize the topology of objects in the heap, through a characterization of the context to which an object belongs. They have been used to support reasoning, memory management, concurrency, etc. Subtyping is traditionally invariant w.r.t. contexts, which has often proven inflexible in some situations. Recent work has introduced restricted forms of subtype variance and unknow...
متن کاملTowards a Simpler Account of Modules and Generativity: Abstract Types
We present a variant of the explicitly-typed secondorder polymorphic λ-calculus with primitive open existential types, i.e. a collection of more atomic constructs for introduction and elimination of existential types. We equip the language with a call-by-value small-step reduction semantics that enjoys the subject reduction property. Traditional closed existential types can be defined as syntac...
متن کاملEncoding Ownership Types in Java
Ownership types systems organise the heap into a hierarchy which can be used to support encapsulation properties, effects, and invariants. Ownership types have many applications including parallelisation, concurrency, memory management, and security. In this paper, we show that several flavours and extensions of ownership types can be entirely encoded using the standard Java type system. Owners...
متن کاملMojojojo — More Ownership for Multiple Owners
Traditional ownership types organise the heap into a tree. Ownership types can support memory management, real-time systems, concurrency, parallelism, and general purpose reasoning about programs. Trees, however, are too restrictive to describe many real programs, limiting the usability of conventional ownership systems. Multiple ownership organises the heap into a directed acyclic graph, rathe...
متن کاملDynamic Typing in Polymorphic Languages Dynamic Typing in Polymorphic Languages Digital Equipment Corporation 1994
matching protects the identity of \hidden" representation types and prevents accidental matches in cases where several abstract types happen to have the same representation. On the other hand, transparent matching allows a more permissive style of programming, where a dynamically typed value of some abstract type is considered to be a value of a di erent version of \the same" abstract type. Thi...
متن کامل